package com.andnnl.mongo;


import com.andnnl.config.ConfigFileHelper;

public class MongoConst {
    public static final String DB_NAME;//= "sms_base";//提交
    public static final String SERVER_IP;// = "192.168.10.88";//提交
    public static final int SERVER_PORT;// = 27017;//提交
    public static final String USERNAME;//
    public static final String PASSWORD;//
    public static final String IS_CREDENTIAL;// true为使用用户名和密码登录，false为不

    static {
        ConfigFileHelper c = new ConfigFileHelper("config");
        DB_NAME = c.getString("mongo.db_name");
        SERVER_IP = c.getString("mongo.server_ip");
        SERVER_PORT = c.getInt("mongo.server_port", 27017);
        USERNAME = c.getString("mongo.username");
        PASSWORD = c.getString("mongo.password");
        IS_CREDENTIAL = c.getString("mongo.is_credential");
    }
}
